package com.newlink.building.userinfo.mvp.model

import com.newlink.building.common_base.base.BaseModel
import com.newlink.building.common_base.http.Base_RetrofitHelper
import com.newlink.building.common_base.model.bean.DefaultData
import com.newlink.building.common_base.model.bean.HttpResult
import com.newlink.building.common_base.model.bean.RemoveFamilyBody
import com.newlink.building.common_base.model.bean.RemoveFamilyMemberRequest
import com.newlink.building.userinfo.mvp.contract.Module_UserInfo_FamilyManagementDetailWaitActivationEmailContract
import io.reactivex.Observable

/**
 * @author wangyang
 * @date 2022/10/12
 * @description 我的——家庭管理——等待激活状态的详情页（邮箱）页面的Model
 */
class Module_UserInfo_FamilyManagementDetailWaitActivationEmailModel : BaseModel(),
    Module_UserInfo_FamilyManagementDetailWaitActivationEmailContract.Model {

    override fun deleteFamilyManagement(
        token: String,
        userId: String
    ): Observable<HttpResult<DefaultData>> {
        return Base_RetrofitHelper.service.deleteFamilyManagement(token, "$userId")
    }

    override fun deleteFamilyManagementFromKcp(token: String, ownerId: String, delUserId: String) {
        val removeRequest = RemoveFamilyMemberRequest(
            accessToken = token,
            uId = ownerId,
            data = RemoveFamilyBody(
                id = delUserId
            )
        )
//        KcpTaskHelper.instance.requestRemoveFamilyMember(removeRequest)
    }
}